tools/x86_64: Fix cpuid() inline asm to not clobber stack's red zone
authorKeir Fraser <keir@xen.org>
Fri, 2 Dec 2011 14:31:14 +0000 (06:31 -0800)
committerKeir Fraser <keir@xen.org>
Fri, 2 Dec 2011 14:31:14 +0000 (06:31 -0800)
commit51b4edac5476726be451614b2ddbd645b4ce1de4
tree7050c10ac0b781ca892b4e30faba8f419ca08868
parentb010d7f5b8b9ab1f95e59bc8d4f0a290a1f1a21b
tools/x86_64: Fix cpuid() inline asm to not clobber stack's red zone

Pushing stuff onto the stack on x86-64 when we do not specify
-mno-red-zone is unsafe. Since the complicated asm is due to register
pressure on i386, we simply implement an all-new simpler alternative
for x86-64.

Signed-off-by: Keir Fraser <keir@xen.org>
Acked-by: Jan Beulich <jbeulich@novell.com>
tools/libxc/xc_cpuid_x86.c
tools/misc/xen-detect.c